package com.uca.sisbec.decorators;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import org.displaytag.decorator.ColumnDecorator;
import org.displaytag.exception.DecoratorException;
import java.lang.Short;

/**
 *
 * @author Jorgore
 */
public class LibroDecorator implements ColumnDecorator {
   
    public String decorate(Object o){
        StringBuffer buffer = new StringBuffer(1000);
        return decorateColumn(buffer,(String)o);
    }
    
    private String decorateColumn(StringBuffer buff, String stg){
        String codigo = stg;
        //String link = "<a href='Libro.jsa?isbn="+codigo+"&cmd=llenarForm'>"+codigo+"</a>" ; 
        String link = "<a href=\"#\" onclick=\"findItem('" + codigo + "')\"";
        link += "><img src=\"./images/select.png\" /></a>";
        buff.append(link);
        return buff.toString();
    }
}
